home *** CD-ROM | disk | FTP | other *** search
/ Visual Cafe 3 / Visual Cafe 3.ISO / Vcafe / JFC.bin / AccessibleAction.java < prev    next >
Text File  |  1998-06-30  |  3KB  |  76 lines

  1. /*
  2.  * @(#)AccessibleAction.java    1.3 98/02/04
  3.  * 
  4.  * Copyright (c) 1997 Sun Microsystems, Inc. All Rights Reserved.
  5.  * 
  6.  * This software is the confidential and proprietary information of Sun
  7.  * Microsystems, Inc. ("Confidential Information").  You shall not
  8.  * disclose such Confidential Information and shall use it only in
  9.  * accordance with the terms of the license agreement you entered into
  10.  * with Sun.
  11.  * 
  12.  * SUN MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY OF THE
  13.  * SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
  14.  * IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
  15.  * PURPOSE, OR NON-INFRINGEMENT. SUN SHALL NOT BE LIABLE FOR ANY DAMAGES
  16.  * SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING
  17.  * THIS SOFTWARE OR ITS DERIVATIVES.
  18.  * 
  19.  */
  20.  
  21. package com.sun.java.accessibility;
  22.  
  23. /**
  24.  * The AccessibleAction interface should be supported by any object 
  25.  * that can perform one or more actions.  This interface
  26.  * provides the standard mechanism for an assistive technology to determine 
  27.  * what those actions are as well as tell the object to perform those
  28.  * actions.  Any object that can be manipulated should support this
  29.  * interface.  Applications can determine if an object supports the 
  30.  * AccessibleAction interface by first obtaining its AccessibleContext (see
  31.  * <a href="com.sun.java.accessibility.Accessible.html">Accessible</a>) and
  32.  * then calling the
  33.  * <a href="com.sun.java.accessibility.AccessibleContext.html#getAccessibleAction">
  34.  * getAccessibleAction</a> method of AccessibleContext.  If the return 
  35.  * value is not null, the object supports this interface.
  36.  *
  37.  * @see Accessible
  38.  * @see Accessible#getAccessibleContext
  39.  * @see AccessibleContext
  40.  * @see AccessibleContext#getAccessibleAction
  41.  *
  42.  * @version     1.3 02/04/98 11:12:57
  43.  * @author    Peter Korn
  44.  * @author      Hans Muller
  45.  * @author      Willie Walker
  46.  */
  47. public interface AccessibleAction {
  48.  
  49.     /**
  50.      * Returns the number of accessible actions available in this object
  51.      * If there are more than one, the first one is considered the "default"
  52.      * action of the object.
  53.      *
  54.      * @return the zero-based number of Actions in this object
  55.      */
  56.     public int getAccessibleActionCount();
  57.  
  58.     /**
  59.      * Returns a description of the specified action of the object.
  60.      *
  61.      * @param i zero-based index of the actions
  62.      * @return a String description of the action
  63.      * @see #getAccessibleActionCount
  64.      */
  65.     public String getAccessibleActionDescription(int i);
  66.  
  67.     /**
  68.      * Perform the specified Action on the object
  69.      *
  70.      * @param i zero-based index of actions
  71.      * @return true if the the action was performed; else false.
  72.      * @see #getAccessibleActionCount
  73.      */
  74.     public boolean doAccessibleAction(int i);
  75. }
  76.